import request from "@/utils/request";

// 1. 请求品牌列表数据
export const reqTrademarkList = (page, limit) =>
  request({
    url: `/admin/product/baseTrademark/${page}/${limit}`,
    method: "get",
  });

/* export const reqTrademarkList = (page, limit) => {
  return request.get(`/admin/cms/banner/${page}/${limit}`);
}; */
// 2. 添加品牌数据接口
export const reqAddTrademark = (trademark) =>
  request({
    url:'/admin/product/baseTrademark/save',
    method: "post",
    data: trademark,
  });

  // 3. 修改品牌
export const reqEditTrademark = (trademark) =>
  request({
    url: '/admin/product/baseTrademark/update',
    method: "put",
    data: trademark,
  });

  // 4. 删除品牌
export const reqDelTrademark = (id) =>
  request({
    url: `/admin/product/baseTrademark/remove/${id}`,
    method:'delete',
  });
 
//export const reqAddTrademark = (trademark) => {
//  if (trademark.id) {
//      /* 新增品牌 */
//        return request({
//          url: `/admin/product/baseTrademark/update`,
//          method: "put",
//          data: trademark,
//        });
//  } else {
//    /* 修改品牌 */
//        return request({
//          url: `/admin/product/baseTrademark/save`,
//          method: "post",
//          data: trademark,
//        });
//    }
//}
